package com.newly.common.base.entity.business.enums;

/**
 * @anthor sbq
 * @date 2021/11/18 14:48
 */
public enum OverweightType {

    空(-1),
    没有超重(0),
    轻度超重(1),
    较轻超重(2),
    严重超重(3);

    OverweightType(int code) {
        this.code = code;
    }

    private Integer code;

    public Integer getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public static OverweightType getOverweightType(Integer s) {
        for (OverweightType t : OverweightType.values()) {
            if (t.getCode().equals(s)) {
                return t;
            }
        }
        return 空;
    }
}
